package a1_p04_jw_kw.graph;

import org.jgrapht.Graph;
import org.jgrapht.graph.DefaultWeightedEdge;

import a1_p04_jw_kw.struct.Node;

public class GraphUtility {
	
	private GraphUtility() {
		
		
	}
	
	public static Node getNode(Graph<Node,DefaultWeightedEdge> g, String name) {
		for (Node node : g.vertexSet()) {
			if (node.name.equals(name)) {
				return node;
				
			}
		}
		
		return null;
	}

}
